Skip to content

Close census connection in extract_czi_markers#8

Merged
hansen7 merged 1 commit intoGenentech:mainfrom
LiudengZhang:fix/census-resource-leak
Apr 4, 2026
Merged

Close census connection in extract_czi_markers#8
hansen7 merged 1 commit intoGenentech:mainfrom
LiudengZhang:fix/census-resource-leak

Conversation

@LiudengZhang
Copy link
Copy Markdown
Contributor

Description

cellxgene_census.open_soma() in extract_czi_markers was never closed, leaking the SOMA connection. This wraps the census usage in try/finally to ensure census.close() is always called, matching the pattern already used in download_czi_reference in the same file.

cellxgene_census.open_soma() was never closed in extract_czi_markers,
leaking the SOMA connection. Wrap the census usage in try/finally to
ensure census.close() is always called, matching the pattern already
used in download_czi_reference.
Copy link
Copy Markdown
Collaborator

@hansen7 hansen7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — fixes SOMA connection leak. try/finally is correct; could use a context manager in a future cleanup but not blocking.

@hansen7 hansen7 merged commit e51ec0f into Genentech:main Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants